﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EngineOfEvermore.Editor.Common;

namespace EngineOfEvermore.Editor.AnimationEditor
{
    public static class AnimationEditorFactory
    {
        public static void CreateAnimationEditor( GorgonRenderTargetManager renderTargetManager )
        {
            AnimationEditorConfig config;
            try
            {
                config = AnimationEditorConfig.LoadFromDefaultPath();
            }
            catch
            {
                config = new AnimationEditorConfig();
            }

            Presenter.Presenter presenter = new Presenter.Presenter();
            View.View view = new View.View( presenter, renderTargetManager, config );
            Model.AnimationEditorModel model = new Model.AnimationEditorModel();

            presenter.AppView = view;
            presenter.AppModel = model;
        }
    }
}
